package com.hzqy.persistence.dao.statistics;

import java.util.List;
import java.util.Map;

import com.hzqy.web.vo.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;

@Repository
public class VisitDao extends PersistenceDao<PmsUserVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(VisitDao.class);
	
	public int selectVisitContentCount(StatDataVisitVo statDataVisitVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectVisitContentCount", statDataVisitVo);
	}
	
	public List<StatDataVisitVo> selectVisitList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectVisitList", map);
	}
	
	public List<StatConfUrlVo> selectConfUrl(StatConfUrlVo statConfUrlVo){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectConfUrl",statConfUrlVo);
	}
	
	public int selectExcelCount(StatDataVisitVo statDataVisitVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectExcelContentCount", statDataVisitVo);
	}
	
	public List<StatDataVisitVo> selectExcelList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectExcelList", map);
	}
	
	public StatConfUrlVo findConfUrl(int f_dvum_id) {
		return getSqlSession().selectOne(this.getNamespace() + "findConfUrl", f_dvum_id);
	}
	
	public List<StatConfUrlVo> findConfUrlList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "findConfUrlList", map);
	}
	
	public int insertConfUrl(StatConfUrlVo statConfUrlVo) {
		return getSqlSession().insert(this.getNamespace() +"insertConfUrl", statConfUrlVo);
	}
	
	public int deleteConfUrl(int f_dvum_id){
		String namespace = this.getNamespace();
		return getSqlSession().update(namespace + "deleteConfUrl", f_dvum_id);
	}
	
	public int updateConfUrl(StatConfUrlVo statConfUrlVo){
		String namespace = this.getNamespace();
		return getSqlSession().update(namespace + "updateConfUrl",statConfUrlVo);
	}
	
	public int findConfUrlCount(StatConfUrlVo statConfUrlVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "findConfUrlCount", statConfUrlVo);
	}

	public List<StatDataVisitVo> selectUVPVByUrl(StatDataVisitVo dataVisitVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectUVPVByUrl", dataVisitVo);
	}
	
	public int selectPlayRecordCount(StatDataPlayRecordVo statDataPlayRecordVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectPlayRecordCount", statDataPlayRecordVo);
	}
	
	public List<StatDataPlayRecordVo> selectPlayRecordList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectPlayRecordList", map);
	}
	
	public int selectSourcePathCount(StatDataSearchPlayVo statDataSearchPlay) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectSourcePathCount", statDataSearchPlay);
	}
	
	public List<StatDataPlayRecordVo> selectSourcePathList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectSourcePathList", map);
	}
	
	public int selectMerchantCount(StatDataMerchantVo statDataMerchantVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectMerchantCount", statDataMerchantVo);
	}
	
	public List<StatDataMerchantVo> selectMerchantList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectMerchantList", map);
	}

	public int selectAdvertisingCount(StatDataAdvertisingStatisticsVo statDataAdvertisingStatisticsVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectAdvertisingCount", statDataAdvertisingStatisticsVo);
	}

	public List<StatDataAdvertisingStatisticsVo> selectAdvertisingList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectAdvertisingList", map);
	}
}
